<?php
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ToolsController;
use App\Http\Controllers\Company\CompanyAdminController;
use App\Http\Controllers\Company\TeacherController;
use App\Http\Controllers\Company\CourseTypeController;
use App\Http\Controllers\Company\CourseController;
use App\Http\Controllers\Company\RoomController;
use App\Http\Controllers\Company\StudentController;
use App\Http\Controllers\Company\ClassController;
use App\Http\Controllers\Company\CourseArrangeController;
use App\Http\Controllers\Company\StudentCourseController;
use App\Http\Controllers\Company\ClassStudentController;
use App\Http\Controllers\Company\ClassCourseController;
use App\Http\Controllers\Company\CompanyController;
use App\Http\Controllers\Company\CountController;
use App\Http\Controllers\Company\DataController;

Route::post('tools/upload-image', [ToolsController::class, 'uploadImage'])->name('uploadImage');

// 登录注册
Route::post('admin/login', [CompanyAdminController::class, 'login'])->name('companyLogin');
Route::post('admin/logout', [CompanyAdminController::class, 'logout']);
Route::post('admin/info', [CompanyAdminController::class, 'info']);
Route::post('admin/get-managers', [CompanyAdminController::class, 'managers']);
Route::post('admin/save-manager', [CompanyAdminController::class, 'saveManager']);
Route::post('admin/delete-manager', [CompanyAdminController::class, 'deleteManager']);

// 教师管理
Route::post('teacher/list', [TeacherController::class, 'list']);
Route::post('teacher/page', [TeacherController::class, 'page']);
Route::post('teacher/info', [TeacherController::class, 'info']);
Route::post('teacher/add', [TeacherController::class, 'add']);
Route::post('teacher/edit', [TeacherController::class, 'edit']);
Route::post('teacher/delete', [TeacherController::class, 'delete']);
Route::post('teacher/count-course', [TeacherController::class, 'count_course']);
Route::post('teacher/course-list', [TeacherController::class, 'course_list']);

Route::post('course/type/list', [CourseTypeController::class, 'list']);
Route::post('course/type/add', [CourseTypeController::class, 'add']);
Route::post('course/type/edit', [CourseTypeController::class, 'edit']);
Route::post('course/type/delete', [CourseTypeController::class, 'delete']);

Route::post('course/list', [CourseController::class, 'list']);
Route::post('course/page', [CourseController::class, 'page']);
Route::post('course/save', [CourseController::class, 'save']);
Route::post('course/delete', [CourseController::class, 'delete']);
Route::post('course/info', [CourseController::class, 'info']);

Route::post('course/arrange/list', [CourseArrangeController::class, 'list']);
Route::post('course/arrange/add', [CourseArrangeController::class, 'add']);
Route::post('course/arrange/edit', [CourseArrangeController::class, 'edit']);
Route::post('course/arrange/delete', [CourseArrangeController::class, 'delete']);
Route::post('course/arrange/info', [CourseArrangeController::class, 'info']);
Route::post('course/arrange/logs', [CourseArrangeController::class, 'logs']);
Route::post('course/arrange/revoke', [CourseArrangeController::class, 'revoke']);
Route::post('course/arrange/sign', [CourseArrangeController::class,'sign']);
Route::post('course/arrange/sign-logs', [CourseArrangeController::class, 'signLogs']);

Route::post('room/list', [RoomController::class, 'list']);
Route::post('room/add', [RoomController::class, 'add']);
Route::post('room/edit', [RoomController::class, 'edit']);
Route::post('room/delete', [RoomController::class, 'delete']);

Route::post('student/page', [StudentController::class, 'page']);
Route::post('student/add', [StudentController::class, 'add']);
Route::post('student/edit', [StudentController::class, 'edit']);
Route::post('student/delete', [StudentController::class, 'delete']);
Route::post('student/info', [StudentController::class, 'info']);

Route::post('student/course/page', [StudentCourseController::class, 'page']);
Route::post('student/course/save', [StudentCourseController::class, 'save']);
Route::post('student/course/delete', [StudentCourseController::class, 'delete']);
Route::post('student/course/signs', [StudentCourseController::class, 'signs']);

Route::post('class/list', [ClassController::class, 'list']);
Route::post('class/page', [ClassController::class, 'page']);
Route::post('class/add', [ClassController::class, 'add']);
Route::post('class/edit', [ClassController::class, 'edit']);
Route::post('class/delete', [ClassController::class, 'delete']);

Route::post('class/course/list', [ClassCourseController::class, 'list']);
Route::post('class/course/add', [ClassCourseController::class, 'add']);
Route::post('class/course/delete', [ClassCourseController::class, 'delete']);

Route::post('class/student/page', [ClassStudentController::class, 'page']);
Route::post('class/student/add', [ClassStudentController::class, 'add']);
Route::post('class/student/edit', [ClassStudentController::class, 'edit']);
Route::post('class/student/delete', [ClassStudentController::class, 'delete']);

Route::post('company/info', [CompanyController::class, 'info']);
Route::post('company/save', [CompanyController::class, 'save']);

Route::post('company/count/total', [CountController::class, 'total']);
Route::post('company/count/percent', [CountController::class, 'percent']);
Route::post('company/count/month-income', [CountController::class, 'month_income']);
Route::post('company/count/month-course', [CountController::class, 'month_course']);

Route::post('company/data/course', [DataController::class, 'course']);